
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-msnui-triangle-down"></use>
                    </svg>
                    <div class="name">箭头向下</div>
                    <div class="fontclass">#icon-msnui-triangle-down</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-msnui-triangle-up"></use>
                    </svg>
                    <div class="name">箭头向上</div>
                    <div class="fontclass">#icon-msnui-triangle-up</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jiahao"></use>
                    </svg>
                    <div class="name">加号</div>
                    <div class="fontclass">#icon-jiahao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wujiaoxing"></use>
                    </svg>
                    <div class="name">五角星</div>
                    <div class="fontclass">#icon-wujiaoxing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jianhao"></use>
                    </svg>
                    <div class="name">减号</div>
                    <div class="fontclass">#icon-jianhao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fangdajing"></use>
                    </svg>
                    <div class="name">放大镜</div>
                    <div class="fontclass">#icon-fangdajing</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youjiantou"></use>
                    </svg>
                    <div class="name">右箭头</div>
                    <div class="fontclass">#icon-youjiantou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-caidan"></use>
                    </svg>
                    <div class="name">菜单</div>
                    <div class="fontclass">#icon-caidan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shanchu"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">#icon-shanchu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fangdajing3"></use>
                    </svg>
                    <div class="name">放大镜3</div>
                    <div class="fontclass">#icon-fangdajing3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shanchu1"></use>
                    </svg>
                    <div class="name">删除</div>
                    <div class="fontclass">#icon-shanchu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-youjiantou1"></use>
                    </svg>
                    <div class="name">左箭头</div>
                    <div class="fontclass">#icon-youjiantou1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wujiaoxingkong"></use>
                    </svg>
                    <div class="name">五角星-空</div>
                    <div class="fontclass">#icon-wujiaoxingkong</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-jiantouxia"></use>
                    </svg>
                    <div class="name">箭头下</div>
                    <div class="fontclass">#icon-jiantouxia</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-magnifier"></use>
                    </svg>
                    <div class="name">放大镜</div>
                    <div class="fontclass">#icon-magnifier</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-duigou"></use>
                    </svg>
                    <div class="name">对勾</div>
                    <div class="fontclass">#icon-duigou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fork"></use>
                    </svg>
                    <div class="name">fork</div>
                    <div class="fontclass">#icon-fork</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-fangdajing1"></use>
                    </svg>
                    <div class="name">觅来3.0</div>
                    <div class="fontclass">#icon-fangdajing1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shaixuanicon1"></use>
                    </svg>
                    <div class="name">筛选icon</div>
                    <div class="fontclass">#icon-shaixuanicon1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-08hongbao"></use>
                    </svg>
                    <div class="name">红包</div>
                    <div class="fontclass">#icon-08hongbao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-duigou1"></use>
                    </svg>
                    <div class="name">对勾</div>
                    <div class="fontclass">#icon-duigou1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shangjiantou"></use>
                    </svg>
                    <div class="name">上箭头</div>
                    <div class="fontclass">#icon-shangjiantou</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhuyegouwudai"></use>
                    </svg>
                    <div class="name">主页购物袋</div>
                    <div class="fontclass">#icon-zhuyegouwudai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zengpin"></use>
                    </svg>
                    <div class="name">赠品</div>
                    <div class="fontclass">#icon-zengpin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wushoucang"></use>
                    </svg>
                    <div class="name">无收藏</div>
                    <div class="fontclass">#icon-wushoucang</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wujifen"></use>
                    </svg>
                    <div class="name">无积分</div>
                    <div class="fontclass">#icon-wujifen</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-wudazhequan"></use>
                    </svg>
                    <div class="name">无打折券</div>
                    <div class="fontclass">#icon-wudazhequan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-mendiangouwudai"></use>
                    </svg>
                    <div class="name">门店购物袋</div>
                    <div class="fontclass">#icon-mendiangouwudai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-meiyoudingdan"></use>
                    </svg>
                    <div class="name">没有订单</div>
                    <div class="fontclass">#icon-meiyoudingdan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-gouwudai"></use>
                    </svg>
                    <div class="name">购物袋</div>
                    <div class="fontclass">#icon-gouwudai</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-banggo"></use>
                    </svg>
                    <div class="name">banggo</div>
                    <div class="fontclass">#icon-banggo</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-svip"></use>
                    </svg>
                    <div class="name">Svip</div>
                    <div class="fontclass">#icon-svip</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-vip"></use>
                    </svg>
                    <div class="name">vip</div>
                    <div class="fontclass">#icon-vip</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-vipe"></use>
                    </svg>
                    <div class="name">vip e</div>
                    <div class="fontclass">#icon-vipe</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-huidaozhuye"></use>
                    </svg>
                    <div class="name">回到主页</div>
                    <div class="fontclass">#icon-huidaozhuye</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-zhuyegeren"></use>
                    </svg>
                    <div class="name">主页个人</div>
                    <div class="fontclass">#icon-zhuyegeren</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-weibiaoti3"></use>
                    </svg>
                    <div class="name">未标题-3</div>
                    <div class="fontclass">#icon-weibiaoti3</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-shangpin"></use>
                    </svg>
                    <div class="name">商品</div>
                    <div class="fontclass">#icon-shangpin</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-suoluetu"></use>
                    </svg>
                    <div class="name">大列表</div>
                    <div class="fontclass">#icon-suoluetu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-liebiao"></use>
                    </svg>
                    <div class="name">小列表</div>
                    <div class="fontclass">#icon-liebiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-2"></use>
                    </svg>
                    <div class="name">收起</div>
                    <div class="fontclass">#icon-2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-1"></use>
                    </svg>
                    <div class="name">展开</div>
                    <div class="fontclass">#icon-1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#icon-kefu1"></use>
                    </svg>
                    <div class="name">客服(1)</div>
                    <div class="fontclass">#icon-kefu1</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
